<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="applicable-device" content="pc,mobile">
    <meta name="viewport"
        content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Expires" content="0">
    <title>折线图展示数据</title>
</head>

<body>
    <div id="main" style="height: 600px;"></div>

    <script src="https://static.ycgame.com/packages/jquery/1.12.3/jquery.min.js"></script>
    <script src="../dist/line_bar.bundle.js"></script>
    <script>
          var config = {
        id: 'main',
        title: 'xxx图',
        xfield: 'tm',
        series: [
            { name: 'a', showname: 'A', type: 'line' },
            { name: 'b', showname: 'B', type: 'bar' },
            { name: 'c', showname: 'C', type: 'line' },
        ]
    }
    var mychart = new RenderChart(config).init();
    var newConfig = {
        series: [
            { name: 'a', showname: 'A', type: 'line' },
            { name: 'b', showname: 'B', type: 'bar' },
        ]
    }
    mychart.setConfig(newConfig)
    var array = [
        { 'tm': '2019-07-16 08:34:00', a: 1, b: 2, c: 3 },
        { 'tm': '2019-07-17 08:34:00', a: 4, b: 1, c: 7 },
        { 'tm': '2019-07-18 08:34:00', a: 2, b: 5, c: 3 }
    ];
    mychart.addDataSource(array)
    </script>
</body>

</html>